how does metabolism work in weight loss